package com.spring.springboot.config;

import com.spring.springboot.dto.Student;
import org.springframework.beans.factory.FactoryBean;
import org.springframework.stereotype.Component;

/**
 * 项目名称: java_algorithm
 * @ClassName MyStudentFactoryBean
 * @Description
 * @Author huipanxing huipanxing@chinasofti.com   @Date 2022/5/18 10:15
 */
@Component
public class MyStudentFactoryBean implements FactoryBean<Student> {
    @Override
    public Student getObject() throws Exception {
        return new Student("1","1");
    }

    @Override
    public Class<?> getObjectType() {
        return Student.class;
    }

    @Override
    public boolean isSingleton() {
        return true;
    }
}
